<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>模拟下拉框</title>
    <script src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<style>
    body {
        background: #fff;
    }
    .simple-select {
        display: inline-block;
        *display: inline;
        zoom: 1;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;
        padding: .5em 1em .5em .5em;
        border: 1px solid #d2d2d2;
        width: 120px;
        font: normal 13px/20px 'Simsun';
        cursor: pointer;
    }
    .simple-select:before {
        position: absolute;
        content: "v";
        right: 1em;
        top: .5em;
        color: #d2d2d2;
    }
    .simple-select-list {
        position: absolute;
        left: 0;
        top: 0;
        width: 120px;
        margin-top: 1em;
        box-sizing: border-box;
        border: 1px solid #d2d2d2;
        display: none;
        background: #fff;
    }
    .simple-select-list a {
        display: block;
        padding: .5em;
    }
    .to-input-clear {
        height: 26px;
    }
    :nth-child(4n+2):last-child {
        float: right
    }
</style>
</head>
<body>
    <div style="padding-top: 200px; width: 2000px;">
        <div style="width: 200px; height: 30px; float: left;"></div>
        <div style="width: 400px; height: 30px; float: left;">
            <form action="?">
                <select class="to-select" id="select01" name="select01">
                    <option value="">请选择</option>
                    <option value="1">选项1</option>
                    <option value="2">选项2</option>
                    <option value="3">选项3</option>
                </select>
                <select class="to-select" id="select02" name="select02">
                    <option value="">请选择</option>
                    <option value="1">选项1</option>
                    <option value="2">选项2</option>
                    <option value="3">选项3</option>
                </select>
                <select class="to-select" id="select03" name="select03" data-width="300px">
                    <option value="">请选择</option>
                    <option value="1">选项1</option>
                    <option value="2">选项2</option>
                    <option value="3">选项3</option>
                </select>
                <p>
                    <input type="submit" value="提交">
                </p>
            </form>
            <br/>
        </div>
    </div>
    
    
    <script src="./select.js"></script>
    <script>
        setTimeout(() => {
            $('.to-select').MySelect()
        }, 0);
    </script>
    
</body>
</html>